import React, {Component} from "react";
import Hello from "./components/Hello";
import Tab from "./components/Tab"

export default class LayOut extends Component{
    constructor(props) {
        super(props)
        this.state = {
            count: 0
        }
    }

    increment = () => {
        this.setState({
            count: ++this.state.count
        })
    }

    render() {
       const {count} = this.state
        return (
            <div>
                <button onClick={this.increment}>父组件 修改 count</button>
                <Hello count={count}></Hello>
            </div>
        )
    }
  
}


// export default function LayOut() {
   
//     return(
//         <div>
//           <Hello />
//           <Tab />
//         </div>
//     )
// }